const userObj = {
  names: ['Jimmy', 'xuexue', 'Jack'],
  get firstUser() {
    console.log('这里获取了这个数据，上报！');
    return this.names[0];
  },
  set firstUser(user) {
    if (typeof user !== 'string') {
      console.error('类型错误');
      return;
    }
    this.namse[0] = user;
  },
};
console.log(userObj.firstUser);
userObj.firstUser = 123;
console.log(userObj.firstUser);
